<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>zxxhouse: src/com/zxx/threadModule/handleThreadModule.java源文件</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">zxxhouse
   &#160;<span id="projectnumber">1.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- 制作者 Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">src/com/zxx/threadModule/handleThreadModule.java</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="keyword">package </span>com.zxx.threadModule;
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="keyword">import</span> java.util.ArrayList;
<a name="l00004"></a>00004 <span class="keyword">import</span> java.util.List;
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="keyword">import</span> android.annotation.SuppressLint;
<a name="l00007"></a>00007 <span class="keyword">import</span> android.os.Handler;
<a name="l00008"></a>00008 <span class="keyword">import</span> android.os.HandlerThread;
<a name="l00009"></a>00009 <span class="keyword">import</span> android.os.Message;
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="keyword">import</span> com.zxx.common.Common;
<a name="l00012"></a>00012 <span class="keyword">import</span> com.zxx.sql.houseData;
<a name="l00013"></a>00013 <span class="keyword">import</span> com.zxx.sql.sqlMan;
<a name="l00014"></a>00014 <span class="keyword">import</span> com.zxx.sql.sqlParam;
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="keyword">public</span> <span class="keyword">class </span>handleThreadModule&lt;Token&gt; <span class="keyword">extends</span> HandlerThread {
<a name="l00018"></a>00018         
<a name="l00019"></a>00019         <span class="keyword">private</span> sqlMan man;
<a name="l00020"></a>00020         <span class="keyword">static</span> <span class="keyword">final</span> String TAGhandler =<span class="stringliteral">&quot;handleThreadTest&quot;</span>;
<a name="l00021"></a>00021         
<a name="l00022"></a>00022                         
<a name="l00023"></a>00023         <span class="keyword">private</span> Handler mHandler; 
<a name="l00027"></a>00027         <span class="keyword">private</span> Handler mResponseHandler; 
<a name="l00028"></a>00028         <span class="keyword">private</span> Listener&lt;Token&gt; mhandlerListener;
<a name="l00029"></a>00029         <span class="keyword">private</span> List&lt;houseData&gt; mhouselist;
<a name="l00030"></a>00030         <span class="keyword">private</span> sqlParam msqlParam; <span class="comment">//sql相关参数</span>
<a name="l00031"></a>00031         
<a name="l00032"></a>00032         <span class="keyword">public</span> handleThreadModule(Handler responseHandler) {
<a name="l00033"></a>00033                 super(TAGhandler);
<a name="l00034"></a>00034                 man = sqlMan.get(null);
<a name="l00035"></a>00035                 mResponseHandler = responseHandler;
<a name="l00036"></a>00036                 mhouselist = <span class="keyword">new</span> ArrayList&lt;houseData&gt;();
<a name="l00037"></a>00037                 msqlParam = null;
<a name="l00038"></a>00038     }
<a name="l00044"></a><a class="code" href="interfacecom_1_1zxx_1_1thread_module_1_1handle_thread_module_3_01_token_01_4_1_1_listener_3_01_token_01_4.html">00044</a>          <span class="keyword">public</span> <span class="keyword">interface </span>Listener&lt;Token&gt; {
<a name="l00045"></a>00045                 <span class="keywordtype">void</span> onUpdateTextView(List&lt;houseData&gt; list,<span class="keywordtype">boolean</span> bcleanAll,<a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_param.html" title="因为下拉刷新的需要，补充的辅助类">sqlParam</a> param);
<a name="l00046"></a>00046             }
<a name="l00047"></a>00047          <span class="keyword">public</span> <span class="keywordtype">void</span> setListener(Listener&lt;Token&gt; listener) {
<a name="l00048"></a>00048                  mhandlerListener = listener;
<a name="l00049"></a>00049             }
<a name="l00050"></a>00050          
<a name="l00058"></a>00058         <span class="keyword">public</span> <span class="keywordtype">void</span> SendMsg(<span class="keywordtype">int</span> whatmsg,<span class="keywordtype">int</span> arg1,<span class="keywordtype">int</span> arg2,Object obj) {
<a name="l00059"></a>00059                  mHandler
<a name="l00060"></a>00060          .obtainMessage(whatmsg,arg1,arg2,obj)
<a name="l00061"></a>00061          .sendToTarget();
<a name="l00062"></a>00062         }
<a name="l00063"></a>00063 
<a name="l00067"></a>00067         @SuppressLint(<span class="stringliteral">&quot;HandlerLeak&quot;</span>)
<a name="l00068"></a>00068         @Override
<a name="l00069"></a>00069         <span class="keyword">protected</span> <span class="keywordtype">void</span> onLooperPrepared() {
<a name="l00070"></a>00070                 <span class="comment">// TODO Auto-generated method stub</span>
<a name="l00071"></a>00071                 mHandler = <span class="keyword">new</span> Handler()
<a name="l00072"></a>00072                 {
<a name="l00073"></a>00073                         
<a name="l00074"></a>00074                         <span class="comment">//This Handler class should be static or leaks might occur </span>
<a name="l00075"></a>00075                         <span class="keyword">public</span> <span class="keywordtype">void</span> handleMessage(Message msg)
<a name="l00076"></a>00076                         {
<a name="l00077"></a>00077                                 <span class="keywordflow">switch</span>(msg.what)
<a name="l00078"></a>00078                                 {
<a name="l00079"></a>00079                                         <span class="keywordflow">case</span>  Common.MESSAGE_INSERTSQL:
<a name="l00080"></a>00080                                         {
<a name="l00081"></a>00081                                                 <span class="keywordflow">if</span>(0 == man.insertData()) {
<a name="l00082"></a>00082                                                         
<a name="l00083"></a>00083                                                 }
<a name="l00084"></a>00084                                                 mhouselist.clear();
<a name="l00085"></a>00085                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00086"></a>00086                                                 <span class="comment">//查找符合条件的列数</span>
<a name="l00087"></a>00087                                                 <span class="keywordtype">int</span> totalrow = man.getSqlAllRow();
<a name="l00088"></a>00088                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00089"></a>00089                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00090"></a>00090                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00091"></a>00091                                                 mhouselist.addAll(man.selectSQLDefault(selectIndex,selectnum));
<a name="l00092"></a>00092                                                 <span class="comment">//第一次加载</span>
<a name="l00093"></a>00093                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);
<a name="l00094"></a>00094                                         }
<a name="l00095"></a>00095                                         <span class="keywordflow">break</span>;  
<a name="l00096"></a>00096                                         <span class="keywordflow">case</span> Common.MESSAGE_SELECTSQLAREA: {
<a name="l00097"></a>00097                                                 mhouselist.clear();
<a name="l00098"></a>00098                                                 <span class="comment">//查找总列数</span>
<a name="l00099"></a>00099                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00100"></a>00100                                                 <span class="keywordtype">int</span> totalrow = man.getdepartmentAllRow(msg.arg1);
<a name="l00101"></a>00101                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00102"></a>00102                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00103"></a>00103                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00104"></a>00104                                                 mhouselist.addAll(man.selectSQLByDepart(msg.arg1,selectIndex,selectnum));
<a name="l00105"></a>00105                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);
<a name="l00106"></a>00106                                         }
<a name="l00107"></a>00107                                         <span class="keywordflow">break</span>; 
<a name="l00108"></a>00108                                         <span class="keywordflow">case</span> Common.MESSAGE_SELECTTOTALSQLPRICE: {
<a name="l00109"></a>00109                                                 mhouselist.clear();
<a name="l00110"></a>00110                                                 <span class="comment">//查找总列数</span>
<a name="l00111"></a>00111                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00112"></a>00112                                                 <span class="keywordtype">int</span> totalrow = man.getTotalPriceAllrow(msg.arg1);
<a name="l00113"></a>00113                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00114"></a>00114                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00115"></a>00115                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00116"></a>00116                                                 mhouselist.addAll(man.selectSQLByTotalPrice(msg.arg1,selectIndex,selectnum));
<a name="l00117"></a>00117                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);
<a name="l00118"></a>00118                                                         
<a name="l00119"></a>00119                                         }
<a name="l00120"></a>00120                                         <span class="keywordflow">break</span>; 
<a name="l00121"></a>00121                                         <span class="keywordflow">case</span> Common.MESSAGE_SORTBYPRICEH_L: {
<a name="l00122"></a>00122                                                 mhouselist.clear();
<a name="l00123"></a>00123                                                 <span class="comment">//查找总列数</span>
<a name="l00124"></a>00124                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00125"></a>00125                                                 <span class="keywordtype">int</span> totalrow = man.getSqlAllRow();
<a name="l00126"></a>00126                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00127"></a>00127                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00128"></a>00128                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00129"></a>00129                                                 mhouselist.addAll(man.sort_byPriceH_L(selectIndex,selectnum));
<a name="l00130"></a>00130                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);        
<a name="l00131"></a>00131                                         }
<a name="l00132"></a>00132                                         <span class="keywordflow">break</span>;
<a name="l00133"></a>00133                                         <span class="keywordflow">case</span> Common.MESSAGE_SORTBYPRICEL_H: {
<a name="l00134"></a>00134                                                 mhouselist.clear();
<a name="l00135"></a>00135                                                 <span class="comment">//查找总列数</span>
<a name="l00136"></a>00136                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00137"></a>00137                                                 <span class="keywordtype">int</span> totalrow = man.getSqlAllRow();
<a name="l00138"></a>00138                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00139"></a>00139                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00140"></a>00140                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00141"></a>00141                                                 mhouselist.addAll(man.sort_byPriceL_H(selectIndex,selectnum));
<a name="l00142"></a>00142                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);
<a name="l00143"></a>00143                                         }
<a name="l00144"></a>00144                                         <span class="keywordflow">break</span>;
<a name="l00145"></a>00145                                         <span class="keywordflow">case</span> Common.MESSAGE_SORTBYYEARH_L:{
<a name="l00146"></a>00146                                                 mhouselist.clear();
<a name="l00147"></a>00147                                                 <span class="comment">//查找总列数</span>
<a name="l00148"></a>00148                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00149"></a>00149                                                 <span class="keywordtype">int</span> totalrow = man.getSqlAllRow();
<a name="l00150"></a>00150                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00151"></a>00151                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00152"></a>00152                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00153"></a>00153                                                 mhouselist.addAll(man.sort_byYearH_L(selectIndex,selectnum));
<a name="l00154"></a>00154                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);        
<a name="l00155"></a>00155                                         }
<a name="l00156"></a>00156                                         <span class="keywordflow">break</span>;
<a name="l00157"></a>00157                                         <span class="keywordflow">case</span> Common.MESSAGE_SORTBYYEARL_H:{
<a name="l00158"></a>00158                                                 mhouselist.clear();
<a name="l00159"></a>00159                                                 <span class="comment">//查找总列数</span>
<a name="l00160"></a>00160                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00161"></a>00161                                                 <span class="keywordtype">int</span> totalrow = man.getSqlAllRow();
<a name="l00162"></a>00162                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00163"></a>00163                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00164"></a>00164                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00165"></a>00165                                                 mhouselist.addAll(man.sort_byYearL_H(selectIndex,selectnum));
<a name="l00166"></a>00166                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);
<a name="l00167"></a>00167                                         }
<a name="l00168"></a>00168                                         <span class="keywordflow">break</span>;
<a name="l00169"></a>00169                                         <span class="keywordflow">case</span> Common.MESSAGE_SORTBYAREAH_L:{
<a name="l00170"></a>00170                                                 mhouselist.clear();
<a name="l00171"></a>00171                                                 <span class="comment">//查找总列数</span>
<a name="l00172"></a>00172                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00173"></a>00173                                                 <span class="keywordtype">int</span> totalrow = man.getSqlAllRow();
<a name="l00174"></a>00174                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00175"></a>00175                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00176"></a>00176                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00177"></a>00177                                                 mhouselist.addAll(man.sort_byAreaH_L(selectIndex,selectnum));
<a name="l00178"></a>00178                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);        
<a name="l00179"></a>00179                                         }
<a name="l00180"></a>00180                                         <span class="keywordflow">break</span>;
<a name="l00181"></a>00181                                         <span class="keywordflow">case</span> Common.MESSAGE_SORTBYAREAL_H:{
<a name="l00182"></a>00182                                                 mhouselist.clear();
<a name="l00183"></a>00183                                                 <span class="comment">//查找总列数</span>
<a name="l00184"></a>00184                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00185"></a>00185                                                 <span class="keywordtype">int</span> totalrow = man.getSqlAllRow();
<a name="l00186"></a>00186                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00187"></a>00187                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00188"></a>00188                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00189"></a>00189                                                 mhouselist.addAll(man.sort_byAreaL_H(selectIndex,selectnum));
<a name="l00190"></a>00190                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);                
<a name="l00191"></a>00191                                         }
<a name="l00192"></a>00192                                         <span class="keywordflow">break</span>;
<a name="l00193"></a>00193                                         <span class="keywordflow">case</span> Common.MESSAGE_SORTBYALL: {
<a name="l00194"></a>00194                                                 mhouselist.clear();
<a name="l00195"></a>00195                                                 <span class="comment">//查找总列数</span>
<a name="l00196"></a>00196                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00197"></a>00197                                                 <span class="keywordtype">int</span> totalrow = man.getSqlAllRow();
<a name="l00198"></a>00198                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00199"></a>00199                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00200"></a>00200                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00201"></a>00201                                                 mhouselist.addAll(man.selectSQLDefault(selectIndex,selectnum));
<a name="l00202"></a>00202                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);                
<a name="l00203"></a>00203                                         }
<a name="l00204"></a>00204                                         <span class="keywordflow">break</span>;
<a name="l00205"></a>00205                                         <span class="keywordflow">case</span> Common.MESSAGE_SELECTBYHOUSETYPE:{
<a name="l00206"></a>00206                                                 mhouselist.clear();
<a name="l00207"></a>00207                                                 <span class="comment">//查找总列数</span>
<a name="l00208"></a>00208                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00209"></a>00209                                                 <span class="keywordtype">int</span> totalrow = man.getHouseTypeRow(msg.arg1);
<a name="l00210"></a>00210                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00211"></a>00211                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00212"></a>00212                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00213"></a>00213                                                 mhouselist.addAll(man.selectSQLByHouseType(msg.arg1,selectIndex,selectnum));
<a name="l00214"></a>00214                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);
<a name="l00215"></a>00215                                         }
<a name="l00216"></a>00216                                         <span class="keywordflow">break</span>;
<a name="l00217"></a>00217                                         <span class="keywordflow">case</span> Common.MESSAGE_SELECTBYZX:{
<a name="l00218"></a>00218                                                 mhouselist.clear();
<a name="l00219"></a>00219                                                 <span class="comment">//查找总列数</span>
<a name="l00220"></a>00220                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00221"></a>00221                                                 <span class="keywordtype">int</span> totalrow = man.getZXTypeRow(msg.arg1);
<a name="l00222"></a>00222                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00223"></a>00223                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00224"></a>00224                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00225"></a>00225                                                 mhouselist.addAll(man.selectSQLByZX(msg.arg1,selectIndex,selectnum));
<a name="l00226"></a>00226                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);
<a name="l00227"></a>00227                                         }
<a name="l00228"></a>00228                                         <span class="keywordflow">break</span>;
<a name="l00229"></a>00229                                         <span class="keywordflow">case</span> Common.MESSAGE_SELECTBYPMPRICE:{
<a name="l00230"></a>00230                                                 mhouselist.clear();
<a name="l00231"></a>00231                                                 <span class="comment">//查找总列数</span>
<a name="l00232"></a>00232                                                 msqlParam = (sqlParam)msg.obj;
<a name="l00233"></a>00233                                                 <span class="keywordtype">int</span> totalrow = man.getPmPriceAllrow(msg.arg1);
<a name="l00234"></a>00234                                                 <span class="keywordtype">int</span> selectIndex = msqlParam.getMselectIndex();
<a name="l00235"></a>00235                                                 <span class="keywordtype">int</span> selectnum = msqlParam.getMselectnum();
<a name="l00236"></a>00236                                                 msqlParam.setMtotalRow(totalrow);
<a name="l00237"></a>00237                                                 mhouselist.addAll(man.selectSQLByPmPrice(msg.arg1,selectIndex,selectnum));
<a name="l00238"></a>00238                                                 setMysqlParam(selectIndex,selectnum,totalrow,msqlParam);
<a name="l00239"></a>00239                                         }
<a name="l00240"></a>00240                                         <span class="keywordflow">break</span>;
<a name="l00241"></a>00241                                         <span class="keywordflow">default</span>:
<a name="l00242"></a>00242                                                 <span class="keywordflow">break</span>;
<a name="l00243"></a>00243                                         
<a name="l00244"></a>00244                                 }
<a name="l00245"></a>00245                                 
<a name="l00246"></a>00246                         }
<a name="l00247"></a>00247                 };
<a name="l00248"></a>00248         }
<a name="l00256"></a>00256         <span class="keyword">private</span> <span class="keywordtype">void</span> setMysqlParam(<span class="keywordtype">int</span> selectIndex,<span class="keywordtype">int</span> selectnum,<span class="keywordtype">int</span> totalrow,sqlParam sqldata){
<a name="l00257"></a>00257                 <span class="comment">//第一次加载</span>
<a name="l00258"></a>00258                 <span class="keywordflow">if</span>(0 == selectIndex){
<a name="l00259"></a>00259                         <span class="keywordflow">if</span>(selectIndex+selectnum &gt;totalrow){
<a name="l00260"></a>00260                                 sqldata.setMselectIndex(totalrow);
<a name="l00261"></a>00261                         }<span class="keywordflow">else</span>
<a name="l00262"></a>00262                         {
<a name="l00263"></a>00263                                 sqldata.setMselectIndex(selectIndex+selectnum);
<a name="l00264"></a>00264                         }
<a name="l00265"></a>00265                         requestUi(<span class="keyword">true</span>,sqldata);<span class="comment">//删除列表，重新加载数据</span>
<a name="l00266"></a>00266                 }<span class="keywordflow">else</span>{
<a name="l00267"></a>00267                         <span class="comment">//第N次加载</span>
<a name="l00268"></a>00268                         <span class="keywordflow">if</span>(selectIndex+selectnum &gt;totalrow){
<a name="l00269"></a>00269                                 sqldata.setMselectIndex(totalrow);
<a name="l00270"></a>00270                         }<span class="keywordflow">else</span>
<a name="l00271"></a>00271                         {
<a name="l00272"></a>00272                                 sqldata.setMselectIndex(selectIndex+selectnum);
<a name="l00273"></a>00273                         }
<a name="l00274"></a>00274                         requestUi(<span class="keyword">false</span>,sqldata);<span class="comment">//已有数据，直接叠加？</span>
<a name="l00275"></a>00275                 }
<a name="l00276"></a>00276         }
<a name="l00282"></a>00282         <span class="keyword">private</span> <span class="keywordtype">void</span> requestUi(<span class="keyword">final</span> <span class="keywordtype">boolean</span> brefresh,<span class="keyword">final</span> sqlParam param) {
<a name="l00283"></a>00283                         mResponseHandler.post(<span class="keyword">new</span> Runnable() {
<a name="l00284"></a>00284                     <span class="keyword">public</span> <span class="keywordtype">void</span> run() {
<a name="l00285"></a>00285                         <span class="keywordflow">if</span>(null != mhouselist) {
<a name="l00286"></a>00286                                 mhandlerListener.onUpdateTextView(mhouselist,brefresh,param);
<a name="l00287"></a>00287                                 }
<a name="l00288"></a>00288                     }
<a name="l00289"></a>00289                 });
<a name="l00290"></a>00290         }
<a name="l00294"></a>00294          <span class="keyword">public</span> <span class="keywordtype">void</span> clearQueue() {
<a name="l00295"></a>00295                  
<a name="l00296"></a>00296                 mHandler.removeMessages(msqlParam.getCmd());
<a name="l00297"></a>00297                 mResponseHandler.removeMessages(msqlParam.getCmd());
<a name="l00298"></a>00298                 
<a name="l00299"></a>00299             }
<a name="l00300"></a>00300 }
<a name="l00301"></a>00301 
<a name="l00302"></a>00302 
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated at 2015年二月4日 星期三 18:11:09 for zxxhouse by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
